import {Authority,getBolb} from '../request'

const {post, get} = Authority


// 监测数据导出
export const downloadRecord = params => getBolb('/open/v1/downloadRecord', {params})

// 监测数据
export const importMonitorData = (url, params) => post('/record/import/v1/import/' + url, params)
// 基准数据
export const importBaseMonitorData = (url, params) => post('/record/import/v1/importBase/' + url, params)

// 获取项目，工点，监测点，监测数据计数
export const projectCount = params => get('/statistics/project/v1/projectCount', {params})

// 获取工程信息管理列表
export const projectInfoQuery = params => get('/project/projectInfo/v1/queryList', {params})

// 工程信息新增
export const projectInfoAdd = params => post('/project/projectInfo/v1/add', params)

// 工程信息更新
export const projectInfoUpdate = params => post('/project/projectInfo/v1/update', params)

// 工程信息删除
export const projectInfoDelete = params => post('/project/projectInfo/v1/delete', params)

// 工程关联工点+监测点信息
export const workPointList = params => get('/project/projectInfo/v1/fullInfo', {params})

// 工点列表
export const getWorkPointList = params => get('/project/project-work-point/v1/queryList', {params})

// 工点删除
export const workPointDelete = params => post('/project/project-work-point/v1/delete', params)

// 监测点列表
export const getMonitorPointList = params => get('/project/project-monitor-point/v1/queryList', {params})

// 工程信息详情
export const getProjectInfo = params => get('/project/projectInfo/v1/getById', {params})

// 工点新增
export const workPointAdd = params => post('/project/project-work-point/v1/add', params)

// 工点编辑
export const workPointUpdate = params => post('/project/project-work-point/v1/update', params)


// 监测点新增
export const monitorPointAdd = params => post('/project/project-monitor-point/v1/add', params)

// 监测点更新
export const monitorPointUpdate = params => post('/project/project-monitor-point/v1/update', params)

// 监测点排序
export const monitorPointSort = params => post('/project/project-monitor-point/v1/updateWeight', params)

// 监测点绑定设备
export const monitorPointBindEquip = params => post('/project/project-monitor-point/v1/setSensor', params)


export const updateMark = params => post('/project/project-monitor-point/v1/mark', params)

// 监测类型绑定传感器表
export const monitorRelationType = () => post('/project/project-monitor-point/v1/relationTypeList')

// -监测类型查询设备
export const queryEquipByMonitorType = params => get('/equip/equip/v1/queryEquipByMonitorType', {params})

// -数据采集分析>工点+监测类型
export const dataAnalysis = params => get('/project/project-work-point/v1/dataAnalysis', {params})

// 监测点详情
export const getMonitorInfo = params => get('/project/project-monitor-point/v1/detail', {params})

// // 地质灾害监测云平台>采集数据查询
// export const searchRecord = params => get('/v1/searchRecord', {params})

// 工点>综合绘图查询
export const searchSynthesisRecord = params => post('/v1/searchSynthesisRecord', params)

// 重置预警基础值
export const resetWarning = params => post('/v1/resetWarning', params)

// 重置基准值
export const cleanInitVal = params => post('/v1/cleanInitVal', params)

// 删除采集数据
export const deleteRecord = params => post('/v1/doRmData', params)

// 数据采集>深部位移筛选枚举
export const relationTypeList = params => get('/open/v1/relationTypeList', {params})

// 深部位移传感器深度数据
export const sbwyDepth = params => get('/v1/sbwyDepth', {params})
//app（画图数据）
export const sbwyDepthEchart = params => get('/app/v1/charts', {params})

export const searchRecord = params => get('/open/v1/searchRecord', { params })
// 检测点占比图
export const monitorChart = params => get('/open/v1/monitorChart', {params})

export const workPointInfo = params => get('/open/v1/workPointInfo', {params})

// 边坡监测点数

// 最新数据
export const queryRecentList = params => get('/open/v1/queryRecentList', {params})

// 预警等级占比
export const countWarnList = params => get('/statistics/project/v1/countWarn', {params})

// 设备在线离线数
export const deviceOnlineStatus = params => get('/open/v1/deviceOnlineStatus', {params})
// 获取解算类型
export const getCalcTypeList = params => get('/open/v1/getCalcTypeByEquipId', { params })

// 分项预警
export const fxWarningList = params => get('/open/v1/getWorkPointWarningDetail', {params})


// 工程下拉选择
export const projectSelect = params => get('/project/projectInfo/v1/projectSelect', {params})

// 工点下拉选择
export const workSelect = params => get('/project/project-work-point/v1/workSelect', {params})

// 工点排序
export const workPointSort = params => post('/project/project-work-point/v1/updateWeight', params)

// 监测点下拉选择
export const monitorSelect = params => get('/project/project-monitor-point/v1/monitorSelect', {params})

// 监测点自动预警状态查询
export const getMonitorAutoWarning = params => get('/project/project-monitor-point/v1/queryAutoWarning', {params})

// 地质灾害监测云平台>更新数据说明
export const doUpdateRemark = params => post('/v1/doUpdateRemark', params)



// 地图数据
export const mapList = params => get('/project/project-work-point/v1/map', {params})

// 行政区分布统计
export const cityCountList = params => get('/statistics/v1/cityCountList', {params})

// 工点所属类型占比统计
export const listTypeCount = params => get('/statistics/v1/listTypeCount', {params})

// 工程所属行业占比统计
export const listIndustryCount = params => get('/statistics/project/v1/listIndustryCount', {params})

// 路线项目数量占比统计
export const roadRouteProjectCount = params => get('/statistics/v1/roadRouteProjectCount', {params})

// 监测类型占比统计
export const listMonitorTypeCount = params => get('/statistics/v1/monitorTypeCount', {params})

// 设备型号占比统计
export const listEquipModelCount = params => get('/statistics/v1/listEquipModelCount', {params})

// 监测点删除
export const monitorDelete = params => post('/project/project-monitor-point/v1/delete', params)

// 组织树形结构
export const listQueryOrgTree = params => get('/user/userLogin/v1/queryList', {params})

// 组织树形结构
export const listQueryOrgTree2 = params => get('/user/userLogin/v1/userSelectList', {params})

// 关联项目时用户路线树形结构
export const queryRoadTree = params => get('/road/roadSection/v1/queryUserRoadTree', {params})

// 监测预警-监测点阈值
export const queryPointRule = params => get('/open/v1/queryPointRule', {params})

// 停止启动工点下 指定监测类型的 所有监测点
export const monitorFlash = params => post('/project/project-monitor-point/v1/flash', params)


//工程模块
// 工点3D模型添加修改
export const workPointModelAddOrUpdate = params => post('/project/work-point-model/v1/addOrUpdate', params)

// 工点3D模型查询
export const workPointModelQueryByWorkPointId = params => get('/project/work-point-model/v1/queryByWorkPointId', {params})

//大概图v1/
export const getMonitorTypeRecord = params => get('/v1/monitorTypeRecord', {params})

export const photoGetLive = params => get('/open/v1/getLive', { params })
